package com.dsh.subscribe.controller;

import com.dsh.model.Result;
import com.dsh.subscribe.entity.HealthCareProgram;
import com.dsh.subscribe.entity.vo.InsuranceCodeVo;
import com.dsh.subscribe.service.InsuranceCodeService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "医保项目视图")
@RestController
@RequestMapping("insuranceCode")
public class InsuranceCodeController {
    @Resource
    InsuranceCodeService insuranceCodeService;
    @GetMapping("selectInsuranceCode")
    @ApiOperation("查全部的医保健康醫療項目")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "limit", value = "分页大小", required = true, dataType = "int"),
            @ApiImplicitParam(paramType = "query", name = "page", value = "分页数", required = true, dataType = "int")
    })
    public Result selectInsuranceCode(String projectName, String typeName, int limit, int page) {
        PageInfo<InsuranceCodeVo> insuranceCodeVoPageInfo = insuranceCodeService.selectInsuranceCode(projectName, typeName, limit, page);
        return Result.success(insuranceCodeVoPageInfo, "");
    }
    @GetMapping("selectOtherInsuranceCode")
    @ApiOperation("查全部的医保其他健康醫療項目")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "limit", value = "分页大小", required = true, dataType = "int"),
            @ApiImplicitParam(paramType = "query", name = "page", value = "分页数", required = true, dataType = "int")
    })
    public Result selectOtherInsuranceCode(String projectName, String typeName, int limit, int page) {
        PageInfo<InsuranceCodeVo> insuranceCodeVoPageInfo = insuranceCodeService.selectOtherInsuranceCode(projectName, typeName, limit, page);
        return Result.success(insuranceCodeVoPageInfo, "");
    }
}
